<!DOCTYPE html>
<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <!-- Meta, title, CSS, favicons, etc. -->
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title>智能化运维系统</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="layui/css/layui.css">
  <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
  <script src="layui/layui.js"></script>
  <style>
    .d-box {
      box-shadow: 4px 4px 16px #757575;
      border-radius: 4px;
      background: #fff;
      margin-top: 30px;
      height: 160px;
      width: 90%;
    }
  </style>

  <!-- Bootstrap -->
  <link href="../vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link href="../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
  <!-- NProgress -->
  <link href="../vendors/nprogress/nprogress.css" rel="stylesheet">
  <!-- bootstrap-daterangepicker -->
  <link href="../vendors/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">

  <!-- Custom Theme Style -->
  <link href="../build/css/custom.min.css" rel="stylesheet">

</head>

<body class="nav-md">
  <div class="container body">
    <div class="main_container">
      <div class="col-md-3 left_col">
        <div class="left_col scroll-view">
          <div class="navbar nav_title" style="border: 0;">
            <a href="index.html" class="site_title"><i class="fa fa-paw"></i> <span>Smart System</span></a>
          </div>

          <div class="clearfix"></div>

          <!-- menu profile quick info -->
          <div class="profile clearfix">
            <div class="profile_pic">
              <img src="images/istio.png" alt="..." class="img-circle profile_img">
            </div>
            <div class="profile_info">
              <span>Welcome</span>
              <h2></h2>
            </div>
          </div>
          <!-- /menu profile quick info -->

          <br />

          <!-- sidebar menu -->
          <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
            <div class="menu_section">
              <h3>智能化运行分析和自适应系统</h3>
              <ul class="nav side-menu">
                <li><a><i class="fa fa-home"></i> 监控界面 <span class="fa fa-chevron-down"></span></a>
                  <ul class="nav child_menu">

                    <li><a href="layermodel.html">分层监控</a></li>
                    <li><a href="dataUI.html">指标数据</a></li>

                  </ul>
                </li>
                <li><a><i class="fa fa-edit"></i> 自适应调整 <span class="fa fa-chevron-down"></span></a>
                  <ul class="nav child_menu">
                    <li><a href="datastrategy.html">基于指标风控调整</a></li>
                    <li><a href="taskstrategy.html">基于任务优先级调整</a></li>
                    <li><a href="linkstrategy.html">基于强化学习的微服务链重部署</a></li>
                  </ul>
                </li>

                <!--
                <li><a><i class="fa fa-desktop"></i> 风险分析告警 <span class="fa fa-chevron-down"></span></a>
                  <ul class="nav child_menu">
                    <li><a href="alert.html">风险告警及指标追踪</a></li>

                  </ul>
                </li>

                
                <li><a><i class="fa fa-table"></i> 指标阈值设置 <span class="fa fa-chevron-down"></span></a>
                  <ul class="nav child_menu">
                    <li><a href="tasklayer.html">任务层</a></li>
                    <li><a href="servicelayer.html">微服务层</a></li>
                    <li><a href="nodelayer.html">结点层</a></li>
                  </ul>
                </li>
                -->

              </ul>
            </div>


          </div>

        </div>
      </div>

      <!-- top navigation -->

      <div class="top_nav">
        <div class="nav_menu">
          <div class="nav toggle">
            <a id="menu_toggle"><i class="fa fa-bars"></i></a>
          </div>

        </div>
      </div>

      <!-- /top navigation -->

      <!-- page content -->
      <div class="right_col" role="main">
        <div class="">
          <div class="page-title">
            <div class="title_left">
              <h3>指标数据 <small> 任务层 </small></h3>
            </div>
          </div>

          <div class="clearfix"></div>

          <div class="row">
            <div class="col-md-4 col-sm-6  ">
              <div class="x_panel">
                <div class="x_title">
                  <h2>任务用时 <small></small></h2>
                  <ul class="nav navbar-right panel_toolbox">
                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                    </li>

                    </li>
                  </ul>
                  <div class="clearfix"></div>
                </div>
                <div class="x_content">
                  <canvas id="line" style="width:276px; height:138px;"></canvas>
                  <div id="tasktime" class="demo-slider" style="position:relative; left: 0px; top: 5px;"></div>
                  <div id="tasktimevalue" style="position:relative; left: 0px; top: 5px;"></div>
                </div>
              </div>
            </div>

            <div class="col-md-4 col-sm-6  ">
              <div class="x_panel">
                <div class="x_title">
                  <h2>单个任务用时 <small></small></h2>
                  <ul class="nav navbar-right panel_toolbox">
                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>

                    </li>
                  </ul>
                  <div class="clearfix"></div>
                </div>
                <div class="x_content">
                  <canvas id="bar"></canvas>
                  <div id="singletasktime" class="demo-slider" style="position:relative; left: 0px; top: 5px;"></div>
                  <div id="singletasktimevalue" style="position:relative; left: 0px; top: 5px;"></div>
                </div>
              </div>
            </div>

            <div class="col-md-4 col-sm-6  ">
              <div class="x_panel">
                <div class="x_title">
                  <h2>任务并发数 <small></small></h2>
                  <ul class="nav navbar-right panel_toolbox">
                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                    </li>
                  </ul>
                  <div class="clearfix"></div>
                </div>
                <div class="x_content">
                  <canvas id="taskCon"></canvas>
                  <div id="taskconcurrency" class="demo-slider" style="position:relative; left: 0px; top: 5px;"></div>
                  <div id="taskconcurrencyvalue" style="position:relative; left: 0px; top: 5px;"></div>
                </div>
              </div>
            </div>

            <div class="page-title">
              <div class="title_left">
                <h3>指标数据 <small> 微服务层 </small></h3>
              </div>
            </div>

            <div class="col-md-4 col-sm-6  ">
              <div class="x_panel">
                <div class="x_title">
                  <h2>资源占用率 <small></small></h2>
                  <ul class="nav navbar-right panel_toolbox">
                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                    </li>

                  </ul>
                  <div class="clearfix"></div>
                </div>
                <div class="x_content">
                  <canvas id="usage"></canvas>
                  <div id="resource" class="demo-slider" style="position:relative; left: 0px; top: 5px;"></div>
                  <div id="resourcevalue" style="position:relative; left: 0px; top: 5px;"></div>
                </div>
              </div>
            </div>

            <div class="col-md-4 col-sm-6  ">
              <div class="x_panel">
                <div class="x_title">
                  <h2>服务链时间 <small></small></h2>
                  <ul class="nav navbar-right panel_toolbox">
                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                    </li>

                  </ul>
                  <div class="clearfix"></div>
                </div>
                <div class="x_content">
                  <canvas id="servicetime"></canvas>
                  <div id="servicelinktime" class="demo-slider" style="position:relative; left: 0px; top: 5px;"></div>
                  <div id="servicelinktasktimevalue" style="position:relative; left: 0px; top: 5px;"></div>
                </div>
              </div>
            </div>

            <div class="col-md-4 col-sm-6  ">
              <div class="x_panel">
                <div class="x_title">
                  <h2>单个服务用时 <small></small></h2>
                  <ul class="nav navbar-right panel_toolbox">
                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                    </li>

                  </ul>
                  <div class="clearfix"></div>
                </div>
                <div class="x_content">
                  <canvas id="single"></canvas>
                  <div id="singleservicetime" class="demo-slider" style="position:relative; left: 0px; top: 5px;"></div>
                  <div id="singleservicetimevalue" style="position:relative; left: 0px; top: 5px;"></div>
                </div>
              </div>
            </div>

            <div class="page-title">
              <div class="title_left">
                <h3>指标数据 <small> 集群节点层 </small></h3>
              </div>
            </div>



            <div class="col-md-4 col-sm-6  ">
              <div class="x_panel">
                <div class="x_title">
                  <h2>CPU <small></small></h2>
                  <ul class="nav navbar-right panel_toolbox">
                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                    </li>

                  </ul>
                  <div class="clearfix"></div>
                </div>
                <div class="x_content">
                  <canvas id="single"></canvas>
                  <div id="singleservicetime" class="demo-slider" style="position:relative; left: 0px; top: 5px;"></div>
                  <div id="singleservicetimevalue" style="position:relative; left: 0px; top: 5px;"></div>
                </div>
              </div>
            </div>



            <div style="width:100%;text-align: center;margin: 0 auto;">
              <button type="button" class="layui-btn layui-btn-lg" style="margin-right: 150px;"
                onclick="clickfunction()">异常模拟</button>
              <button type="button" class="layui-btn layui-btn-lg" onclick="clickfunction()">异常模拟</button>
              <button type="button" class="layui-btn layui-btn-lg" style="margin-left: 150px;"
                onclick="clickfunction()">异常模拟</button>
            </div>


          </div>
          <div class="clearfix"></div>
          <br />
        </div>
      </div>
      <!-- /page content -->

      <!-- footer content -->
      <footer>
        <div class="pull-right">
          <a href="https://colorlib.com"></a>
        </div>
        <div class="clearfix"></div>
      </footer>
      <!-- /footer content -->
    </div>
  </div>

  <!-- jQuery -->
  <script src="../vendors/jquery/dist/jquery.min.js"></script>
  <!-- Bootstrap -->
  <script src="../vendors/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
  <!-- FastClick -->
  <script src="../vendors/fastclick/lib/fastclick.js"></script>
  <!-- NProgress -->
  <script src="../vendors/nprogress/nprogress.js"></script>
  <!-- Chart.js -->
  <script src="../vendors/Chart.js/dist/Chart.min.js"></script>
  <!-- jQuery Sparklines -->
  <script src="../vendors/jquery-sparkline/dist/jquery.sparkline.min.js"></script>
  <!-- Flot -->
  <script src="../vendors/Flot/jquery.flot.js"></script>
  <script src="../vendors/Flot/jquery.flot.pie.js"></script>
  <script src="../vendors/Flot/jquery.flot.time.js"></script>
  <script src="../vendors/Flot/jquery.flot.stack.js"></script>
  <script src="../vendors/Flot/jquery.flot.resize.js"></script>
  <!-- Flot plugins -->
  <script src="../vendors/flot.orderbars/js/jquery.flot.orderBars.js"></script>
  <script src="../vendors/flot-spline/js/jquery.flot.spline.min.js"></script>
  <script src="../vendors/flot.curvedlines/curvedLines.js"></script>
  <!-- DateJS -->
  <script src="../vendors/DateJS/build/date.js"></script>
  <!-- bootstrap-daterangepicker -->
  <script src="../vendors/moment/min/moment.min.js"></script>
  <script src="../vendors/bootstrap-daterangepicker/daterangepicker.js"></script>

  <!-- Custom Theme Scripts -->
  <script src="../build/js/custom.min.js"></script>

  <script src="../vendors/echarts.min.js"></script>

  <style>
    .notfloat:after {
      content: ".";
      display: block;
      height: 0;
      clear: both;
      visibility: hidden;
    }
  </style>

  <script>
    function clickfunction() {
      alert("产生XX风险，XX指标异常。请前往策略界面选择合适调整策略。");
    }
    $(document).ready(function () {
      var ele = document.getElementById("line");
      var graph = new Chart(ele, {
        type: 'line',
        data: {
          labels: ["19：00", "19：10", "19：20", "19：30", "19：40", "19：50", "20：00"],
          datasets: [
            {
              label: "CPU使用率",
              fillColor: "rgba(220,220,220,0.2)",
              strokeColor: "rgba(220,220,220,1)",
              pointColor: "rgba(220,220,220,1)",
              pointStrokeColor: "#fff",
              pointHighlightFill: "#fff",
              pointHighlightStroke: "rgba(220,220,220,1)",
              data: [65, 59, 80, 81, 56, 55, 40]
            },
            {
              label: "内存使用率",
              fillColor: "rgba(151,187,205,0.2)",
              strokeColor: "rgba(151,187,205,1)",
              pointColor: "rgba(151,187,205,1)",
              pointStrokeColor: "#fff",
              pointHighlightFill: "#fff",
              pointHighlightStroke: "rgba(151,187,205,1)",
              data: [28, 48, 40, 19, 86, 27, 90]
            }, {
              label: "阈值 ",
              fillColor: "rgba(38,88,154,0.31)",
              strokeColor: "rgba(38,88,205,1)",
              pointColor: "rgba(38,88,205,1)",
              pointStrokeColor: "#fff",
              pointHighlightFill: "#fff",
              pointHighlightStroke: "rgba(151,187,205,1)",
              data: [90, 90, 90, 90, 90, 90, 90]
            }]
        }
      })



      var ele = document.getElementById("bar");
      var graph = new Chart(ele, {
        type: 'bar',
        data: {
          labels: ["19：00", "19：10", "19：20", "19：30", "19：40", "19：50", "20：00"],
          datasets: [
            {
              label: "单个任务用时",
              fillColor: "rgba(220,220,220,0.5)",
              strokeColor: "rgba(220,220,220,0.8)",
              highlightFill: "rgba(220,220,220,0.75)",
              highlightStroke: "rgba(220,220,220,1)",
              data: [65, 59, 80, 81, 56, 55, 40]
            },
            {
              label: "任务阈值 ",
              fillColor: "rgba(20,187,205,0.5)",
              strokeColor: "rgba(151,187,205,0.8)",
              highlightFill: "rgba(151,187,205,0.75)",
              highlightStroke: "rgba(151,187,205,1)",
              data: [90, 90, 90, 90, 90, 90, 90]
            }],
        }
      })



      var ele = document.getElementById("taskCon");
      var graph = new Chart(ele, {
        type: 'line',
        data: {
          labels: ["19：00", "19：10", "19：20", "19：30", "19：40", "19：50", "20：00"],
          datasets: [
            {
              label: "任务1并发数",
              fillColor: "rgba(220,220,220,0.2)",
              strokeColor: "rgba(220,220,220,1)",
              pointColor: "rgba(220,220,220,1)",
              pointStrokeColor: "#fff",
              pointHighlightFill: "#fff",
              pointHighlightStroke: "rgba(220,220,220,1)",
              data: [65, 59, 80, 81, 56, 55, 40]
            },
            {
              label: "阈值 ",
              fillColor: "rgba(38,88,154,0.31)",
              strokeColor: "rgba(38,88,205,1)",
              pointColor: "rgba(38,88,205,1)",
              pointStrokeColor: "#fff",
              pointHighlightFill: "#fff",
              pointHighlightStroke: "rgba(151,187,205,1)",
              data: [90, 90, 90, 90, 90, 90, 90]
            }]
        }
      })


      var ele = document.getElementById("usage");
      var graph = new Chart(ele, {
        type: 'radar',
        data:
        {
          labels: ["19：00", "19：10", "19：20", "19：30", "19：40", "19：50", "20：00"],
          datasets: [
            {
              label: "资源利用率",
              fillColor: "rgba(220,220,220,0.2)",
              strokeColor: "rgba(220,220,220,1)",
              pointColor: "rgba(220,220,220,1)",
              pointStrokeColor: "#fff",
              pointHighlightFill: "#fff",
              pointHighlightStroke: "rgba(220,220,220,1)",
              data: [65, 59, 80, 81, 56, 55, 40]
            },
            {
              label: "阈值 ",
              backgroundColor: "rgba(3,88,106,0.3)",
              fillColor: "rgba(38,88,154,0.31)",
              strokeColor: "rgba(38,88,205,1)",
              pointColor: "rgba(38,88,205,1)",
              pointStrokeColor: "#fff",
              pointHighlightFill: "#fff",
              pointHighlightStroke: "rgba(151,187,205,1)",
              data: [90, 90, 90, 90, 90, 90, 90]
            }]
        }

      })



      var ele = document.getElementById("servicetime");
      var graph = new Chart(ele, {
        type: 'bar',
        data: {
          labels: ["19:00", "19：15", "19：30", "19：35",],
          datasets: [
            {
              label: "服务链用时",
              fillColor: "rgba(220,220,220,0.5)",
              strokeColor: "rgba(220,220,220,0.8)",
              highlightFill: "rgba(220,220,220,0.75)",
              highlightStroke: "rgba(220,220,220,1)",
              data: [59, 80, 56, 40]
            },
            {
              label: "任务阈值 ",
              fillColor: "rgba(20,187,205,0.5)",
              strokeColor: "rgba(151,187,205,0.8)",
              highlightFill: "rgba(151,187,205,0.75)",
              highlightStroke: "rgba(151,187,205,1)",
              data: [90, 90, 90, 90]
            }],
        }
      })


      var ele = document.getElementById("single");
      var graph = new Chart(ele, {
        type: 'bar',
        data: {
          labels: ["service1", "service2", "service3", "service4",],
          datasets: [
            {
              label: "单个任务用时",
              fillColor: "rgba(220,220,220,0.5)",
              strokeColor: "rgba(220,220,220,0.8)",
              highlightFill: "rgba(220,220,220,0.75)",
              highlightStroke: "rgba(220,220,220,1)",
              data: [59, 80, 56, 40]
            },
            {
              label: "任务阈值 ",
              fillColor: "rgba(20,187,205,0.5)",
              strokeColor: "rgba(151,187,205,0.8)",
              highlightFill: "rgba(151,187,205,0.75)",
              highlightStroke: "rgba(151,187,205,1)",
              data: [90, 90, 90, 90]
            }],
        }
      })










    })

  </script>

  <script>

    layui.use('slider', function () {
      var $ = layui.$,
        slider = layui.slider;

      slider.render({
        elem: '#tasktime',
        value: 90,
        input: true, //输入框
        tips: true, //默认提示层
        change: function (value) {
          $('#tasktimevalue').html('设置阈值：' + value + ' ms');
        }
      });

      slider.render({
        elem: '#singletasktime',
        value: 90,
        input: true, //输入框
        tips: true, //默认提示层
        change: function (value) {
          $('#singletasktimevalue').html('设置阈值：' + value + ' ms');
        }
      });

      slider.render({
        elem: '#taskconcurrency',
        value: 90,
        input: true, //输入框
        tips: true, //默认提示层
        change: function (value) {
          $('#taskconcurrencyvalue').html('设置阈值：' + value + ' ms');
        }
      });


      slider.render({
        elem: '#servicelinktime',
        value: 90,
        input: true, //输入框
        tips: true, //默认提示层
        change: function (value) {
          $('#servicelinktasktimevalue').html('设置阈值：' + value + ' ms');
        }
      });


      slider.render({
        elem: '#singleservicetime',
        value: 90,
        input: true, //输入框
        tips: true, //默认提示层
        change: function (value) {
          $('#singleservicetimevalue').html('设置阈值：' + value + ' ms');
        }
      });

      slider.render({
        elem: '#resource',
        value: 90 //初始值
        ,
        range: true //范围选择
        ,
        input: true, //输入框
        tips: true, //默认提示层
        change: function (vals) {
          $('#resourcevalue').html('最小利用率：' + vals[0] + '%' + '、最大利用率：' + vals[1] + '%');
        }
      });

    });
  </script>

</body>

</html>